#include <iostream>

using namespace std;


class Person
{
public:
    Person()
    {
        cout<<"父类无参构造"<<endl;
    }

    ~Person()
    {
        cout<<"父类析构函数 "<<endl;
    }

    /* 纯虚函数*/
    virtual int makeMoney() = 0;

    /* 非纯虚函数*/
    virtual int shop() = 0;
    // {
    //     cout<<"Person 消费"<<endl;
    //     return 0;
    // }

private:
    long m_age;
};

class Student : public Person
{
public:
    Student()
    {
        cout<<"子类无参构造"<<endl;
    }
    ~Student()
    {
        cout<<"子类析构函数 "<<endl;
    }
    /* 重写*/
    int makeMoney()
    {
        cout<<"Person 兼职-赚钱 "<<endl;
        return 0;
    }

    int shop()
    {
        cout<<"Person 消费-买书"<<endl;
        return 0;
    }
    

public:
    int m_no;

};


int main()
{
    //Person per;
    Student stu;

    return 0;
}